package com.cai.primeton.entity;

import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.annotations.Table;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

/**
 * @version 1.0
 * @author：蔡松坡
 * @date：2021/7/1 11 : 25
 * @package：com.cai.primeton.entity
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Entity(name = "puser")
@ApiModel(value = "用户实体")
public class PUser {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    @Column(name="account")
    private String account;  //账号
    @Column(name = "username")
    private String username;  //用户名
    @Column(name = "password")
    private String password;  //密码
    @Column(name = "email")
    private String email;  //邮箱
    @Column(name = "phone")
    private String phone;  //手机号
    @Column(name = "state")
    private String state;  //状态   启用 停用
    @Column(name = "days")
    private Integer days;  //借阅天数
    @Column(name = "createtime")
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date createtime;  //创建时间
    @Column(name = "modifytime")
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date modifytime;  //修改时间
    @Column(name = "createuser")
    private String createuser;  //创建用户人
    @Column(name = "modifyuser")
    private String modifyuser;//修改用户人
    @Column(name = "roleid")
    private Integer roleid; //角色编号

}
